package com.liner.animal;

import com.liner.service.Swim;

public class Dog extends Animal implements Swim {
    public Dog(String name, int age, String address) {
        super(name, age, address);
    }

    @Override
    void eat() {
        System.out.println(age + "岁的" + color + name + "吃骨头");
    }

    void lookHome() {
        System.out.println(age + "岁的" + color + name + "在看家");

    }


    @Override
    public void swim() {
        System.out.println(age + "岁的" + color +name + "正在狗刨");
    }

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", color='" + color + '\'' +
                '}';
    }
}
